#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :page_4.py
# @Time      :2024/11/1 21:07
# @Author    :zhou_yi
import streamlit as st
from st_componets.st_fn import Fn
from st_componets.st_init import st_session_init

"""  ----------------------页面-page4---------------------------   """
st_session_init()  # 会话设置
st.markdown('### 信息录入')
st.divider()

with st.sidebar:
    with st.container(border=True):
        Fn.tpl_file_upload()

    with st.container(border=True):
        Fn.db_file_upload()

    with st.container(border=True):
        Fn.img_file_upload()

colC = st.columns([1, 2])
with colC[0]:
    with st.container(border=True):
        st.markdown("#### 手工录入")
        # 数据库添加或修改记录
        with st.expander(label='客户信息录入'):
            Fn.custom_input('add_custom')

        # 数据库添加或修改记录
        with st.expander(label='点位信息录入'):
            Fn.point_input('add_point')

        # 数据库添加记录添加或修改
        with st.expander(label='清运记录录入'):
            Fn.clear_record_input(key='add_record')

with colC[1]:
    with st.container(border=True):
        st.markdown("#### 数据显示")

        with st.expander(label='显示company'):
            st.dataframe(Fn.reversed_show('company'))

        with st.expander(label='显示address'):
            st.dataframe(Fn.reversed_show('address'))

        with st.expander(label='显示clear_waster_records'):
            st.dataframe(Fn.reversed_show('clear_waster_records'))

if __name__ == '__main__':
    ...
